<?php
namespace app\common\model;

use app\common\traits\Text;
use think\Model;
use think\facade\Session;

class Renwuleixing extends Model
{
    use Text;


    /**
     * 用户状态修改器
     * @param $value
     * @param $data
     * @return mixed
     */
    public function getStatusTextAttr($value, $data)
    {
        $status = [1=>'<span class="label label-success">正常</span>',2=>'<span class="label label-danger">禁用</span>'];
        return $status[$data['status']];
    }

}